strComputer="."
set objWMI=GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
set colOS=objWMI.InstancesOf("Win32_OperatingSystem")
for each objOS in colOS
strReturn= Round(((objOS.TotalVisibleMemorySize-objOS.FreePhysicalMemory)/objOS.TotalVisibleMemorySize)*100)
Wscript.Echo strReturn
next